﻿@model MSAcademic.v2.Web.Areas.Admin.Models.Section.SubSectionListForContentSectionModel

@{
    ViewBag.Title = "Podsekcije odabrane sekcije";
}

<script type="text/javascript"> 
    $(function () {
        $('.actions-wrapper .create, .subsections .tag-cloud-wrapper .edit').on('mousedown', function () {
            msacademic.dialogPopup( $(this).data('url'));
        });
    });
</script>

<div class="subsections">
    <h2>Podsekcije odabrane sekcije</h2>

    <ul class="tag-cloud-wrapper">
    @foreach (var subSection in Model.SubSections)
    {
        <li>
            <a data-url="@Url.RouteUrl("EditSubSection", new { subId = subSection.Id})" class="edit">  @subSection.Name  </a> 
            <a href="@Url.RouteUrl("DeleteSubSection", new { subId = subSection.Id})" class="delete"> <img src="~/Areas/Admin/Content/Images/delete.png" /> </a> 
        </li>
    }
    </ul>

    <div class="actions-wrapper"><a data-url="@Url.RouteUrl("NewSubSection", new { contentId = Model.contentId } )" class="positive create"> Stvori novu podsekciju </a></div>
</div>